#ifndef _CLIENT_H_
#define _CLIENT_H_

#include "Doctor.h"


#include<sstream>
#include<string>
using namespace std;

#include "Code.h"
#include "Person.h"
#include "Appointment.h"
#include "Profession.h"
#include "Consultation.h"

/**
 * Implementation of the Class Client
 */
class Client : public Person {
public:
    Client();
    Client(const Doctor &familyDoctor, const Profession &profession, const Code &code);
    virtual ~Client();

    // Family Doctor
    Doctor *getFamilyDoctor() const;
    void setFamilyDoctor(const Doctor & familyDoctor);

    // Profession
    Profession *getProfession() const;
    void setProfession(const Profession & profession);

    // Client Code
    Code *getClientCode() const;
    void setClientCode(const Code &clientCode);

    // Consultation management
    bool addConsultation(const Consultation &consultation);

    // Appointments management
    bool addAppointment(const Appointment &appointment);
    bool removeAppointment(unsigned short position);

    // Client print
    void printAppointmentHistoricalData(unsigned short deepness = 0);
    void printConsultationHistoricalData(unsigned short deepness = 0);

    // Existing Professions
    void printExistingProfessions();

    // I/O, bool consults = 0, bool appointments = 0
    string printClient(bool consults = 0, bool appointments = 0);
    void newClient(Client & client);

private:
    Doctor *familyDoctor;
    Profession *profession;
    Code *clientCode;
    vector<Consultation *> consults;
    vector<Appointment *> appointmentsMade;
    static vector<Profession *> existentProfessions;

};
#endif // _CLIENT_H_
